package team.yidong.fenda.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import team.yidong.fenda.entity.HospitalImg;

import java.util.List;

/**
 * Created by xuanlong on 2017/11/17.
 */
public interface HospitalImgRepository extends JpaRepository<HospitalImg, Integer> {
    @Query("select hospitalImg from HospitalImg hospitalImg join hospitalImg.hospital hospital where hospital.id=?1")
    List<HospitalImg> findByHospital(Integer hospitalId);

}
